package ooday05.homework;

public class EnumTest1 {
    public static void main(String[] args) {
        Seasons1[] seasons = Seasons1.values();// 获取所有枚举对象
        for (int i = 0; i < seasons.length; i++) {
            System.out.println(seasons[i]);
        }
        Seasons1 s = Seasons1.WINTER;// 获取WINTER
        switch (s) {
            case SPRING:
                System.out.println("春天到了...");
                break;
            case SUMMER:
                System.out.println("夏天到了...");
                break;
            case AUTUMN:
                System.out.println("秋天到了...");
                break;
            case WINTER:
                System.out.println("冬天到了...");
                break;
        }
    }
}
